Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reduce the chance of a sporadic failure of unit test on CI machine #375

Merged
merged 1 commit into from
Jun 29, 2013

Conversation

gcheng
Copy link

@gcheng gcheng commented Jun 28, 2013

No description provided.

@xuezhai
Copy link
Contributor

xuezhai commented Jun 29, 2013

looks goods

@xuezhai xuezhai closed this Jun 29, 2013
@xuezhai xuezhai reopened this Jun 29, 2013
gcheng pushed a commit that referenced this pull request Jun 29, 2013
reduce the chance of a sporadic failure of unit test on CI machine
@gcheng gcheng merged commit 542361c into Azure:release Jun 29, 2013
jianghaolu pushed a commit to jianghaolu/azure-sdk-for-java that referenced this pull request Apr 5, 2017
reduce the chance of a sporadic failure of unit test on CI machine
conniey added a commit that referenced this pull request Mar 10, 2019
* Made some classes/fields private

* Block blob tests

* Changing method of comparing flowable data to buffer list

* Only fromFile and fromBuffer tests remaining

* Finished up transfer manager tests

* Resolved some CR comments

* CR feedback

* Updated some project infrastructure. Fixed some failing tests. Three tests still failing, but they are not critical

* Added some missing licenses to tests

* Started writing retry policy

* Implemented first test scenario. Not tested.

* Fixed up some container tests that weren't actually validating properly. Got the first retry test working.

* Added test for max retries and made fixes that now correctly capture errors

* Got a bit more of the delay test working

* All retry tests passing

* Some cleanup

* Minor fixes

* CR feedback

* Moved some files around. Made getters on RetryOptions package private

* Removed an extra file left over from a merge

* Update README.md

Adding direct link to the API Reference docs for the Preview release and quickstart

* Tried making some swagger changes

* Another iteration of swagger generation

* Everything broken

* Generated swagger with proper (de)serialization

* Added support for setBlobTier. No tests or samples

* Tests for blob tier

* CR feedback

* Make AzureStorageCheckpointLeaseManager sync internally to get around potential deadlock when checkpointing (#349)

* Doc for append blob create

* Updated file reference

* Added apiNote

* Fixed sample ref path again

* Addressing the repo root as ..

* Started on ref samples. Maybe a third of methods done.

* Moved the sample tags to the bottom

* added a few more samples

* More samples

* More samples

* More samples

* PageBlob Samples

* Added lease samples

* api ref samples complete

* soft delete support. no tests or samples yet

* Changelog

* Working on tests

* Soft delete tests

* Changelog and BreakingChanges

* CR feedback

* Added api ref samples for tiers and soft delete

* Fixed swagger README

* Update EPH dependences. Update EPH version for release. (#353)

* Fixed an api note to generate docs

* Appveyor is running EPH tests that should not run (#356)

* Appveyor is running EPH tests that should not run.
The tests only run if certain environment variables are set.
I don't know how or why they are set. Force Appveyor to unset them.

* Maven 3.5.2 doesn't exist on apache servers anymore, update to 3.5.4.

* PutBlockFromURL

* Improved ContainerURL tests

* Updated api ref samples

* Cleaned up some types in tests that were causing failures

* Appveyor detection fix (#358)

EPH test cases which need actual Azure entities look in environment variables for the connection strings and skip if not found. Those environment variables shouldn't be set in Appveyor but the test cases were trying to run anyway, and failing. Syntax for appveyor.yml allows for setting environment variables but it isn't obvious how to delete them, so change code to also check APPVEYOR environment variable.

* Fixing API ref links

* 10.0.2-Preview release prep

* Updated dependency and javadoc configuration

* Generated with new autorest version to comply with new runtime

* Updated dependency issue. Releasing 10.0.3-Preview to fix

* EPH 2.0.1 release -- fix deadlocks (#357)

Due to a threading change in client 1.0.2, EPH 2.0.0 has the potential to deadlock due to thread starvation under a particular set of conditions:

* The Event Hub has more partitions than the threadpool has threads
* AND the application is using the default Azure Storage-based checkpoint manager
* AND the IEventProcessor.onEvents implementation checkpoints
* AND a large number of partitions on the same host attempt to checkpoint at almost the same time.

The problem: The threading change in client 1.0.2 means that IEventProcessor.onEvents is executing in the same threadpool where the checkpoint manager runs. To ensure ordering of checkpoints, it is important that the onEvents implementation waits for the checkpoint call to return, which means a thread in the threadpool is blocked. If there are too many checkpoint calls in rapid succession, it is possible for all threads in the threadpool to be blocked, leaving no threads available to perform the checkpointing.

The fix: This condition occurred because the Azure Storage-based checkpoint manager was attempting to be asynchronous internally, even though the API exposed by Azure Storage is synchronous. Thus, writing one checkpoint required two threads: one running onEvents and blocking, and another to run the task that calls Azure Storage. Since the Azure Storage API is synchronous, this is wasteful at best. Refactored the default checkpoint manager to be mostly synchronous and return pre-completed CompletableFutures. This means that onEvents and the Storage calls run on the same thread. That thread still ends up blocked waiting for Storage, but even if every thread in our threadpool ends up blocked that way, the Storage client has its own separate threadpool internally and can always make progress. The Storage calls will always return (successfully or not) and unblock our threads.

* Distinguish between nonexistent entity and other errors which return amqp:not-found (#354)

* Update how to add properties (#361)

* Websockets support (#362)

1. Supports max_frame_size of 4k (current limitation of <a href="https://github.com/Azure/qpid-proton-j-extensions">qpid-proton-j-extensions</a> library)

2. doesn't support PROXY on websockets - this will follow.

Amqp over WebSockets is particularly used when enterprise policies (ex: firewall outbound port rules) doesn't allow traffic on the default Amqp secure port (`5671`).
To send or receive over websockets - which uses port `443`, set the `TransportType` on `ConnectionStringBuilder`, like this:

```
connectionStringBuilder.setTransportType(TransportType.AmqpWebSockets)
```

related: #264

* Update Overview.md (#363)

* Fix params

* Added worm support

* getAccountInfo apis added

* Improved append blob tests

* Static websites

* Updated blob tests

* Most page blob tests

* Retry fixes

* Fix Overview files & update proton library version (#365)

* update API in the overview docs to work with latest version.
* update proton version.

* Service SAS Signature Values correctly handles nulllable fields

* Page blob tests updates

* Fixing links for API reference

* Got some boilerplate going

* Got some preliminary tests written and passing

* Added some tests

* downloadToBuffer complete

* downloadBlobToFile written

* Nothing really

* Basic test passing

* downloadToFileTests complete

* Moved sample tag

* added a cast to prevent a potential overflow

* Added etag locking

* Made the options properties final as possible

* CR feedback

* Nothing special

* Fixed issue in etag locking that messed up access conditions

* Removed memory mapping from TransferManager

* CR feedback

* ServiceSAS tests

* SAS tests complete

* Updated links for api refs

* Logging tests

* Updated changelog

* Added a test to ensure uploadFromFile is replayable

* Last minute cleanup before release

* Fixed some transiet failures in incremental copy tests

* RequestResponseChannel should not throw OperationCancelled. (#372)

* Implement retry mechanism for Receiver and Sender creation (#373)

* msgreceiver creation - retry on transient errors
* messagesender creation retry
* always throw TimeoutException on transient failures
* throw schedulererrors to usercode
* verify retry invocation in unittests

* update version for releasing version 1.1.0 (#374)

* Release commit for package com.microsoft.azure.eventhubs version 1.1.0  (#375)

* websocket support (#362)
* fix an issue with ExceptionContract - when request-response channel closes with transient error (#372)
* include PartitionReceiver and PartitionSender creation to participate in RetryPolicy (#373)

* Interfaces for helper types updated

* Added reliable download functionality to DownloadResponse

* Most tests converted to downloadResponse

* Removed RetryReader

* Cleanup

* Reverted to retrying on IOException

* Small doc update

* Added context class

* Switched to autorest generated headers and access conditions

* Fixed tests

* Extracted TransferManager inner classes to top level

* Added hints to user that Flowables for upload must be replayable

* Incorporated new autorest exception type

* Updated some tests

* Changelog breakingChanges

* Generated with context feature

* Added context parameter. need to add tests

* Started context tests

* Infra for context tests

* Halfway through context tests

* Added tests for context

* Changelog breakingChanges

* Deleted some old files

* Fixed a broken test

* Release cleanup

* Added min overloads

* WebSockets Proxy support (#378)

* followup: websockets proxy support (#381)

* Cleaned up and reformatted some docs immediately postGA. Trying establish consistent style. Other misc cleanup

* Added some test infra and logging to help debug errors in CI

* Added package info for blob package for javadoc description

* Fixed up api ref samples link and CI

* Added deep sync copy support

* Added support for progress reporting

* Fix failing unit tests (#381)

Fix some unit tests to no longer depend on specific test environment.

* Fixed some overflow bugs in TransferManager and reliable download setup in BlobURL

* CR feedback and updated Contributing doc

* Added issue template

* Added min overloads

* Cleaned up and reformatted some docs immediately postGA. Trying establish consistent style. Other misc cleanup

* Added some test infra and logging to help debug errors in CI

* Added package info for blob package for javadoc description

* Fixed up api ref samples link and CI

* Added deep sync copy support

* Fixed some overflow bugs in TransferManager and reliable download setup in BlobURL

* Added support for progress reporting

* CR feedback and updated Contributing doc

* Release prep

* * Fixed a de-dup - of Delivery event issue on proton receivelink (#391)

* Updated LoggingFactory to also log request HTTP method, URL, and headers (#394)

* Updated LoggingFactory to also log request HTTP method, URL, and headers

* Updated README to include table

* Update README.md

* Update README.md

* Update version numbers for EPH 2.0.2 release (#394)

* Fixed a flaky block blob test

* Added policy to set request on response object

* Added custom deserializer to fix bug that would sometimes return incomplete listing results

* Added support for slf4j. Added default logging

* 10.3.0 release prep

* Update ChangeLog.txt

* Update ChangeLog.txt

* EPH PartitionPump fixes (#401)

* Handle tmpdir with no trailing separator.

* Fix IO pipe stuck issue due to aggressive timer scheduling (#402)

There is an issue in the logic where operation timeout timer is scheduled as part of a receive call and due to the bug operation timer can be scheduled multiple times although it is supposed to be set only once when there is no pending receive call. Over time as the operation timer keeps getting scheduled during receive API call and scheduled again by the reactor thread while the event is fired and being handled, the number of pending IO operations on the pipe gets incremented significantly and it can cause IO pipe stuck and blocks a write operation on the pipe, which in turn, blocks a receive API. There are two changes to address the issue: a) ensure that operation timer is scheduled at most two times to avoid excessive IO operations on the pipe and b) read all bytes from the channel when signaled so that there are no remaining bytes in the channel.

* Prep for releasing client 1.3.0 and EPH 2.1.0 (#403)

* Release client 2.0.0 and EPH 2.2.0 (#416)

* Update Apache Proton-J dependency (0.29.0 --> 0.31.0) (#407)

* PartitionReceiver - add a method that provides an EventPosition which corresponds to an EventData returned last by the receiver (#408)

* Support IsPartitionEmpty property for PartitionRuntimeInformation (#399)

* Move setPrefetchCount API to the ReceiverOptions class from the PartitionReceiver and update the settings of Default & Max Prefetch count (#410)

This pull request includes two major changes related to Prefetch API.

1) Move setPrefetchCount API to the ReceiverOptions class so that prefetch value specified by a user can be used instead of using default value when communicating to the service during link open and initializing a receiver. This change also addresses the receiver stuck issue caused by setPrefetchAPI in a race condition.

2) Change the default value and set the upper bound of the prefetch count. Note that prefetch count should be greater than or equal to maxEventCount which can be set when either a) calling receive() API or b) implementing the getMaxEventCount API of the SessionReceiverHandler interface.

* Fixes several issues in the reactor related components (#411)

This pull request contains the following changes.

1) Finish pending tasks when recreating the reactor and make sure pending calls scheduled on the old reactor get complete.
2) Fix the session open timeout issue which can result in NPE in proton-J engine.
3) Make session open timeout configurable and use the value of OperationTimeout.
4) Update the message of exceptions and include an entity name in the exception message.
5) API change - use ScheduledExecutorService.
6) Improve tracing.

* Implement comparable on EventData (#395)

* Update receive/send link creation logic and improve tracing (#414)

* Prep for releasing client 2.0.0 and EPH 2.2.0 (#415)

* Removed some lingering dev notes

* Changed test behavior to allow for absence of some creds

* Release prep

* Upload from non replayable flowable

* 10.5.0 release prep

* Standardize indention and publishing (#2974)

* SpotBug P3 Fixes (#2973)

* Adding suppression for having named static inner classes from anonymous.

* Add suppression for redundant null check.

* Move SIC_INNER_SHOULD_BE_STATIC suppression

* Make anonymous class in CachingKeyResolver a named inner static.

* Include missing impl classes for auto-rest when it generates a variable with known null value

* Suppressing unconfirmed casts because we know the cast is correct but the APIs weren't designed for it

* Bumping up resource-manager parent and eventgrid.v2019_01_01 to version 1.0.0 (#2975)

* Bumping up resource-manager parent pom to 1.0.0

* Bumping up eventgrid.v2019_01_01 to version 1.0.0

* code restructure

* [AutoPR privatedns/resource-manager] Add private dns module name for java codegen (#3009)

* Generated from e92e525831933bedf2242fe607984757387be1b2

Add private dns module name for java codegen

* Update pom for private dns

* change private dns version back to beta

* SpotBug P3 fixes (#2976)

* Suppress using Nullable parameter as non-null for KeyVaultKey because it was a scenario in original SDK not thought of.

* Suppress return empty array rather than null

* Add null check for service to ensure it has been initialized

* Checking for null service value before invoking method

* Catching specific exceptions rather than Exception e

* Use 8L so that the integer multiplication is not implicitly cast to long.

* Add exclude for catch Exception in CachingKeyResolver

* Catching specific exceptions rather than Exception e

* Update YAML formatting (#3033)

- Update whitespace to match Prettier formatting
- Add .prettierrc.yml
- Part of Azure/azure-sdk#225

* adding impression pixel (#3024)

license/cla override. Check isn't coming back for some reason.

* Add .editorconfig and .gitattributes (#3036)

* Adding .editorconfig

* Add .gitattributes

* Reformat pom.client.xml

* Reformat keyvault/data-plane/pom.xml

* Reformat batch/data-plane/pom.xml

* Enable Checkstyle fail on error / violation for Key Vault (#2969)

* Now that KeyVault data-plane has no more checkstyle errors or violations, we are now enforcing build failure for this project and all child modules.

* Install build tools locally so that checkstyle can run.

* Fix whitespace

* It is not necessary to run checkstyle:check as the build will fail satisfactorily under the analyze job.

* Record playback integration (#2870)

Record/Playback Integration in Azure Batch Java SDK tests. 
Added Test recordings to be used in playback mode.

* Normalising lines (#3050)

* Fix for issue #2874. Add a cache for the tokens in case we are getting (#2875)

tokens from IMDS.

* Run dependency checker during Analyze (#3075)

* Run dependency checker during Analyze

* Add docs links
sima-zhu pushed a commit to sima-zhu/azure-sdk-for-java that referenced this pull request Mar 21, 2019
* Check for null channel before closeAndRelease

* Remove client-runtime-native

* channel.write() until not writable, then flush

* Add Base64Util for all base64 encoding/decoding

* HttpPipeline.build with Iterable. Fixes Azure#375.

* Extract AddDatePolicyFactory to public class. Fixes Azure#391.

* Require DecodingPolicyFactory for responses with serialized bodies

* Fix NPE when getting the HttpClientInboundHandler from the pipeline

* Refinements to FlowableUtil

* Update README.md and release notes

* Cleanup pom

* Propagate nulls through Base64Util methods

* add Netty config changes to changelog

* Don't log by default in default Azure pipeline

* Use .cache() instead of writing Single.just() to instance variable

* Add delay param to RetryPolicyFactory. Check isDecoded() for custom headers types.

* Use try-with-resources in FlowableUtilTests
conniey added a commit that referenced this pull request Mar 26, 2019
* Fix bugs and docs

* Fix checkstyle

* Add status code checking to PollStrategy.updateFromAsync()

* Fix checkstyle

* Fix mentions of credentials in comments

* Add proxy support

* Ignore proxy tests

* Add proxy authentication policy

* Add scheme to proxy authentication header value

* Fix checkstyle

* Add address information to IllegalArgumentException

* Add mention of proxy authentication in Builder.withProxy

* Fixes from review feedback

* Rename URI in NettyAdapter to channelAddress

* Update to RxJava2 and fix build errors

* Fix tests

* Update build scripts

* Fix Android CI

* Fixes from feedback. Better RestProxy exception messages.

* Fix gradle.build for Android

* Fix handling of checked exceptions from serialization

* Add required parameters to Builder constructor. Add default RestClient.

* Tweak docs and use AzureRestClient in AzureServiceClient

* Add back deprecated, parameterless builder constructor

* Remove unused serializer adapters in tests

* Replace RestClient with HttpPipeline (#302)

* Add initial Pipeline implementation

* Remove RestClient, AzureRestClient, ServiceClient, and AzureServiceClient.

* Fix tests

* Reorder HttpPipeline.build() arguments

* Fix checkstyle

* Add defaultSerializer() method on RestProxy

* Add ServiceClient and AzureServiceClient back with modifications

* Small changes to RestProxy and AzureProxy

* Add createDefaultHttpClient() methods to RestProxy

* Add HttpPipeline.Options and RequestPolicy.Options

* Add UrlBuilder.parse() (#303)

* Add UrlBuilder.parse() method

* Add PortPolicy class

* Parsing URLs is non-trivial. Revert to using Java URL parse

* Fix copy and paste error

* Add ProtocolPolicy and tests (#305)

* Add health check to channel pool

* Add extra request policies to RestProxy's default pipeline (#307)

* Add extra request policies to RestProxy's default pipeline

* Create a new NettyAdapter for each NettyClient

* Fix checkstyle

* Add InputStream support for HttpRequestBody (#308)

* Create HttpPipeline.Builder from an existing HttpPipeline (#309)

* Create HttpPipeline.Builder from an existing HttpPipeline

* Insert directly into requestPolicyFactories

* Use io.reactivex for new RequestPolicies

* Use Maybe to deserialize response bodies

* Remove usages of Exceptions.propagate

* Add AzureEnvironment to AzureServiceClient and add AzureProxy.create(… (#310)

* Add AzureEnvironment to AzureServiceClient and add AzureProxy.create() overload that takes an AzureServiceClient

* Remove AzureProxy.create() overload that takes baseUrl

* Remove RestProxy.create() overload that takes a baseUrl

* Fix build errors

* Add HostPolicy (#311)

* Add HostPolicy

* Remove extra 'withHost()' call

* Add HostPolicy tests with port

* Add http scheme if no scheme is provided when creating a HttpRequest … (#313)

* Add http scheme if no scheme is provided when creating a HttpRequest in RestProxy

* Remove adding a default protocol when one isn't specified

* Remove unused exception import

* Move LogLevel to LoggingPolicy, expand HttpPipeline.Logger and add si… (#312)

* Move LogLevel to LoggingPolicy, expand HttpPipeline.Logger and add simple implementations

* Remove RestProxyTests changes

* Fix build breaks and checkstyle errors

* Add withRequestPolicies

* Add UrlTokenizer and make UrlBuilder use it (#316)

* Fixes and coverage for exception serialization

* Remove unused imports

* Allow full URLs as value for PathParam (#317)

* Begin experimenting with Flowable response content

* Implement HttpContentFlowable

* Fix checkstyle

* Fix build errors

* Add missing Test attribute

* Some error handling and other tweaks

* Update Netty version. Stress testing. Fix test build errors.

* Add MD5 verification to downloads test

* Test cancellation

* Test small file uploads

* Simplify download test

* Recent requests from Rikki and Josh (#319)

* Add HttpPipeline.LogLeve.OFF and AbstractRequestPolicy.shouldLog()

* Make BodyParam Content-Type required

* Fix build break

* Hide HttpPipeline.Logger inside RequestPolicy.Options (#320)

* Hide HttpPipeline.Logger inside RequestPolicy.Options

* Add tests for RequestPolicy.Options

* Add AsyncInputStream and FlowableFileStream

* Extract all inner classes to their own files (#321)

* Fix checkstyle

* Add Flowable content to HttpRequestBody interface

* Remove LoggingPolicy from RestProxyTests

* Changes from feedback, bug fixes, additional testing

* Fix bug in test

* Add parallel upload test

* Remove FlowableFileStream. Backpressure file reads. More stress testing.

* Fix path replacement bug reported by Storage team (#323)

* Tweak concurrency in tests

* Add timeouts and central cleanup

* Fix hanging issue and cleanup

* Bring back FileRequestBody

* Fix file over-reading bug

* More fixes

* Fix typo in doc

* Don't overwrite a UrlBuilder path with a slash (#326)

* Don't overwrite a UrlBuilder path with a slash

* Add UrlBuilder tests

* Add upload test which writes files to disk upfront

* Add Throttling policy

* Add isReplayable to AsyncInputStream

* Add parallel download test

* Add download time taken logging

* Support AsyncInputStream return type

* Set Content-Length: 0 when body is null

* Add AsyncInputStream.create(byte[])

* Reduce duplication when sending request content

* Single<HttpResponse> closes channel if disposed before emitting

* Release channel back to pool after closing

* Helpers for cancellation and error emit

* Add a RestProxy.create() overload that takes a ServiceClient parameter (#332)

* Add a RestProxy.create() overload that takes a ServiceClient parameter

* Rename AzureProxy.defaultPipeline() to AzureProxy.createDefaultPipeline()

* Remove Charsets.defaultCharset(). Update Jackson.

* Revert Jackson version to 2.8.11 and add JacksonSerializer tests (#336)

* Thread safety, native transports, and async file I/O (#337)

* Experimental EpollEventLoopGroup

* Add profiles to pom. Change HttpRequestBody to abstract class.

* Try using getConstructor().getInstance()

* Fix bug with mixed nio/native components

* Get inner exception message if needed

* Fix incorrect string for EpollEventLoopGroup

* Use native transports when Netty sizes manually specified

* Experiment with Rx test file creation

* Add prepareFiles step and properly parallelize

* More test file creation tweaks

* Simplify stress tests and improve file gen

* Fix bug in FileReadFlowable. Add writeContentToFile(Flowable).

* Fix early completion in writeContentToFile

* Write to file in download test. Fix thread safety in ResponseContentFlowable.

* Limit concurrency in download test

* Fix race in writeContentToFile

* Add download/upload streaming test

* Add x86_64 check to pom

* Thread safety improvements

* Change subscribeOn to observeOn and simplify test

* Require users to include native modules in runtime builds

* Make eventLoopGroup and channelPool final

* Fixes from feedback

* Use subscribeOn instead of observeOn for HTTP response content

* Fix typo

* Consolidate NettyAdapter constructors

* ThrottlingInterceptor tweaks

* Use HttpMethod instead of String (#342)

* Add HttpMethod class

* Use HttpMethod instead of strings

* Use Single.error instead of throw Exceptions.propagate (#343)

* Use URL objects instead of Strings (#344)

* Remove check for null body parameter and get tests to pass (#346)

* Tweaks for Azure Libraries for Java (#345)

* Add ServiceFuture.fromBody(Single)

* Throw unchecked exception from RestProxy.invoke

* Add TimeoutPolicyFactory. Delete UseOtherHostPolicy.

* Remove AddRequestPolicyBefore/After. UserAgentPolicyFactory inversion.

* ProtocolPolicy.Factory -> ProtocolPolicyFactory

* CredentialsPolicy.Factory -> CredentialsPolicyFactory

* RetryPolicy.Factory -> RetryPolicyFactory

* AddCookiesPolicy.Factory -> CookiePolicyFactory

* PortPolicy.Factory -> PortPolicyFactory

* AddHeadersPolicy.Factory -> AddHeadersPolicyFactory

* ProxyAuthenticationPolicy.Factory -> ProxyAuthenticationPolicyFactory

* Factory class inversion in RestProxyStressTests

* LoggingPolicy.Factory -> HttpLoggingPolicyFactory

* RequestIdPolicy.Factory -> RequestIdPolicyFactory

* HostPolicy.Factory -> HostPolicyFactory

* Fix checkstyle

* Add flag to pretty print JSON HTTP bodies (#347)

* Emit initial response when polling. Allow empty body to complete ProvisioningStatePollStrategy. (#348)

* Emit OperationStatus corresponding to Void response (#349)

* Remove unused ListOperationCallback (#353)

* Use Flowable<byte[]> instead of AsyncInputStream. Drop File body types. (#354)

* Use Flowable<byte[]> instead of AsyncInputStream. Drop File body types.

* Remove HttpRequestBody. Refine HttpRequest.withBody doc.

* Fix test build errors

* Perform response deserialization in HttpPipeline (#360)

* Add DecodingPolicyFactory. Fix client-runtime tests.

* Fix test failures mainly by reverting to older impls

* Rename inner class

* Fix checkstyle

* Cleanup

* Remove unused methods

* RestResponse implements Closeable

* Add null check to DecodingPolicy

* Fixes based on self-review

* Fixes from review feedback

* Use Flowable<ByteBuffer> instead of Flowable<byte[]> (#361)

* byte[] -> ByteBuffer and experimental ByteBufAllocator

* Fix checkstyle

* Fix build errors. Use standard ByteBufAllocator.

* Add memory mapped upload test

* Add ByteBuffer splitting and read/write memory mapping

* Fix build errors

* Use ByteBuffer.remaining()

* Remove AsyncInputStream (#363)

* Wrap exceptions generated from deserialization and other minor tweaks (#364)

* Add ByteBufferUtil and tests (#365)

* Add ByteBufferUtil and tests

* Update ByteBufferUtil.toByteArray() comment

* Expanded test for ByteBufferUtil.toByteArray()

* Add FlowableUtil.collectBytesInBuffer() method (#366)

* Add decoding policy to default pipelines (#367)

* Add DecodingRequestPolicy to default RestProxy HttpPipeline

* Add DecodingRequestPolicy to AzureProxy default Pipeline

* Fix checkstyle

* addQueryParameter() -> setQueryParameter() (#368)

* Add client-runtime-native module (#369)

* Add client-runtime-native pom

* Move mvn os extension to parent pom. Use os.detected.arch.

* Simplify native pom

* Actually necessary to manually include boringssl in each profile

* Update to Netty 4.1.21 and test read-only memory mapped file (#370)

* Add support for x-ms-header-collection-prefix extension (#371)

* Add support for x-ms-header-collection-prefix extension

* Fix checkstyle and update HeaderParam documentation

* Add runtime support for deserializing HeaderCollections (#376)

* Add runtime support for deserializing HeaderCollections

* Fix checkstyle failures

* Fix javadoc error (#378)

* Always specify charset with new String(). Prefer StandardCharsets over Charsets. (#379)

* Add shutdown() method to HttpClient.Factory (#380)

* Make HttpClient.Factory Closeable and add tests

* Experimenting with other approaches to try and make shutdown work reasonably

* Use Completable for shutdown()

* Factor out HttpClient inner interfaces

* Fix leak in NettyResponse.collectContent()

* Fixes to try/catch in NettyClient.java

* Make shutdown() lazy

* Handle missing Content-Length

* Fix proxy host header bug

* Handle readableBytes/array().length mismatch

* Use daemon ThreadFactory in NettyClient

* Use daemon mode for SharedChannelPool worker thread

* Initial check in for resumable LRO.

* checkstyle fix

* Checkstyle fixes.

* Check style fixes.

* Checkstyle updates.

* Checkstyle fixes.

* Another checkstyle fix.

* Fix Void response body connection leak (#384)

* Fix spelling in PollStrategy Javadoc (#392)

* Add RestResponse subtypes and handling (#393)

* Add RestResponse subtypes and handling

* Tweak Javadocs and modify tests to use some concrete types

* Target Java 8

* Use lambdas in RestProxyStressTests

* Use java.util.Base64 instead of Guava

* Various minor improvements (#396)

* Remove Apache Commons dependency

* HttpClientFactory.close() instead of shutdown()

* Use per-instance lock in SharedChannelPool. Fixes #388

* Fix condition wait in SharedChannelPool. Fixes #390

* Disable test for close() with in-flight request

* Fix checkstyle

* Update README.md and add convenience HttpPipelineBuilder methods (#398)

* Update README.md. Add convenience methods to HttpPipelineBuilder.

* Tweak wording

* Remove unused test imports

* Update groupId in example dependencies

* Fix reentrant safety in ResponseContentFlowable (#402)

* Use a queue drain flag

* Use BackpressureHelper.addCap()

* Update changelog for preview 1

* [maven-release-plugin] prepare release v2.0.0-beta1

* [maven-release-plugin] prepare for next development iteration

* Remove Joda dependency (#404)

* Remove Joda dependency in favor of Java 8 built-in classes

* Serialize HTTP request header values and URL Query values

* Fix checkstyle

* Add back apache commons for now (#416)

* Move groupId above parent groupId so publish tools can infer it (#418)

* v2 NettyClient flowable rework (#406)

* v2 NettyClient flowable rework

* add break to drain loop, add await calls to unit tests

* remove TODO line

* add wip and missed comments to explain usage in drain loop

* update wip and missed comments

* update wip and missed comments

* checkstyle fixes

* use HttpClient.createDefault in NettyClientTests

* increase timeout in test

* add NettyClient test to test concurrency

* NettyClientTests - add logging to testConcurrentRequests

* disable WireMock request journalling for concurrency test

* only use one client with concurrency test

* assert md5 hash of responses for concurrency test

* assert total number of bytes in NettyClient.testConcurrentRequests

* refactor testConcurrentRequests

* rename NettyResponse.streamBodyAsync to NettyResponse.body and add javadoc

* make isDisposed volatile, rename didEmitHttpResponse to httpResponseEmitted and make volatile

* use AtomicBoolean for disposed to ensure channelPool just gets closed once, protect FlowableResponseContent from events arriving before Subscription (queue them properly) and ensure drain by calling drain also from onSubscribe

* add TODO

* remove observeOn from request.body() because Netty handles scheduling on eventloop if required

* refactor to extract getChannelAddress method to make easier to read

* sendRequestInternalAsync rework

* sendRequestInternalAsync rework

* sendRequestInternalAsync rework

* sendRequestInternalAsync rework - NettyClientTests pass

* checkstyle fix in NettyClient.java

* wrap long line, fix state transition on operationComplete

* extract non-static class RequestSubscriber

* make Subscription volatile

* add comments

* Add Jetty static server for RestProxyStressTest downloads

* Don't write to file in download test

* add failing download100MParallelTest and enable stress test

* fix allocation of contentEmitter by assigning earlier

* add sysout logs

* call read after every channelRead event and set channel from channelActive call

* ignore RestProxyStressTests

* remove redundant transition

* fix requested accounting (finally)

* fix requested accounting a bit more

* add comment about using BackpressureHelper.produced

* fix checkstyle

* remove no-modification compareAndSets

* propagate HttpClient method renames to other modules

* rewrite FlowableUtil.readFile and add tests

* add backpressure test for FlowableUtil.readFile

* increase number of chunks so that long input tests for FlowableUtil.readFile are about 100MB

* delete large input test files on successful completion of tests in FlowableUtil.readFile

* remove commment

* extract constant

* fix checkstyle and add overflow check

* do another overflow check and move cancelled check inside while loop

* add null check for channelInactive event

* add FlowableUtil.split tests

* remove old unused FileReadFlowable, refactor by embedding FileReadSubscription to save some allocations

* Add MockServer and update RestProxyStressTests to communicate with it

* Add exec-maven-plugin configuration for MockServer

* FlowableUtil.readFile subscriber can implement CompletionHandler, fix unit test of split

* simplify drain a little

* Request content after channelWriteComplete. Test transient errors. Paranoid leak detection.

* Null check in channelReadComplete. Simple file content generator in upload test.

* Add request body error test

* Warn when contentEmitter is null in channelReadComplete

* Remove synchronous file read because it doesn't seem related to the root issue

* Read request content during transient failure

* fix transitions (retry wasn't happening), remove double setDisposable

* add unit test for request body emitting an error

* remove sysouts and add another unit test

* make minor efficiency change to FlowableUtil.readFile

* Use env var for temp folder path

* fix maxRequired to be more defensive about long calculation returning less than zero, reduce volatile reads

* set ByteBuffer position before flip to incorporate bytesWanted

* edit comment

* add comment

* add writability processsing

* fix state transition for writing

* add comments

* throw RuntimeException if item arrives before request made

* Netty client rework 2 (#420)

* Remove seemingly redundant writing state machine

* Remove unnecessary EncoderException recovery

* Optimistically add channel to leased list while waiting for it to connect

* Remove apparently unnecessary warning about null contentEmitter

* Only release and close on response completion if request not complete

* Fix checkstyle

* Send 202 for DELETE to satisfy testHighParallelism()

* Launch MockServer automatically. Run stress tests based on env var.

* Share IOService between test cases, not MockServer

* More test tweaks. Still WIP.

* Disable test server child process for now

* Reduce parallelism in upload/download test

* Don't close channel if response content subscription completed normally

* Move os-maven-plugin to client-runtime-native package. Update Netty and RxJava versions. (#421)

* Various minor improvements (#425)

* Check for null channel before closeAndRelease

* Remove client-runtime-native

* channel.write() until not writable, then flush

* Add Base64Util for all base64 encoding/decoding

* HttpPipeline.build with Iterable. Fixes #375.

* Extract AddDatePolicyFactory to public class. Fixes #391.

* Require DecodingPolicyFactory for responses with serialized bodies

* Fix NPE when getting the HttpClientInboundHandler from the pipeline

* Refinements to FlowableUtil

* Update README.md and release notes

* Cleanup pom

* Propagate nulls through Base64Util methods

* add Netty config changes to changelog

* Don't log by default in default Azure pipeline

* Use .cache() instead of writing Single.just() to instance variable

* Add delay param to RetryPolicyFactory. Check isDecoded() for custom headers types.

* Use try-with-resources in FlowableUtilTests

* [maven-release-plugin] prepare release v2.0.0-beta2

* [maven-release-plugin] prepare for next development iteration

* Update version number in README

* Add os-maven-plugin example to README

* Update Netty to 4.1.25.Final (#429)

* Add FlowableUtil.ensureLength (#430)

* Add CountingOperator and tests

* Use Flowable instead of FlowableOperator

* Make ensureLength return FlowableTransformer

* Use doOn* operators instead of custom operator

* [maven-release-plugin] prepare release v2.0.0-beta3

* [maven-release-plugin] prepare for next development iteration

* Initial tweaks in hopes of fixing channel pipeline NRE bug (#456)

* Add request property to RestResponse (#457)

* Support custom port for https proxy (#462)

* Explicitly specify http vs https proxy instead of inferring by port

* Update changelog

* Update README.md to reference beta 4

* Raise MAX_SEND_BUF_SIZE to 64 KB

* Update dependency versions

* Fix checkstyle

* [maven-release-plugin] prepare release v2.0.0-beta4

* [maven-release-plugin] prepare for next development iteration

* Add UnexpectedLengthException (#468)

* Add UnexpectedLengthException

* Update tests

* [maven-release-plugin] prepare release v2.0.0-beta5

* [maven-release-plugin] prepare for next development iteration

* Fix HTTPS proxying (#476)

* Progress on HTTPS proxying

* Fix Azure compile error

* Simplify netty pipeline and reduce possibility of corruption

* Fix build error

* Enable MSICrdentials in v2: Merging msi credentials for app-service and vm (#474)

* Enable MSICrdentials in v2: Merging msi credentials for app-service and vm

* Removing unused AppServiceMSICredentials and using binary expotential backoff algo retry

* Guava gone (#477)

* Try removing TypeToken

* Fix all tests

* Use TypeUtil

* Simply getTypeArgument

* Move things a little bit

* Progress on HTTPS proxying

* Fix Azure compile error

* Simplify netty pipeline and reduce possibility of corruption

* Fix build error

* Remove type factory

* Checkstyle

* Clean up

* Adding beta annotation (#478)

* Add Context class, HttpRequest property, and RestProxy handling (#479)

* Add Context class, HttpRequest property, and RestProxy handling

* Handle null arguments

* Implement our own URL escaper (#481)

* Implement our own escaper

Copy Guava url utils

Use local guava copies

Modify license according to CELA

Use our own escaper

* Be conservative about query escaping

* Use our own license header

* Checkstyle

* Fix errors when guava gone in azure-client-runtime

* Add tests for Url escaper and type util

* Fix azure-client-authentication

* Fix Cli token class

* Add SkipParentValidation annotation from v1 (#484)

* [fixes #460] Fix request body logging (#485)

* [fixes #460] Fix request body logging

* checkstyle

* Remove Refresh token client and fix CLI login (#486)

* Remove Refresh token client and fix CLI login

* One more fix

* ProvisioningStateStrategy should not poll if there is no provisioningState property (#487)

* Remove channel writing state machine (#482)

* Remove channel writing state machine

This state machine doesn't appear to do anything because all the writes occur on the event loop anyway. We can rely on channel.isWritable() and the nature of the single event loop thread running for the channel to prevent multiple simultaneous requests for request content.

* Use batch mode in maven

* Request more data after writing if channel is still writable

* [maven-release-plugin] prepare release v2.0.0

* [maven-release-plugin] prepare for next development iteration

* Add versionConfig.csv

* Support async adal authentication (#499)

* Add delegated token credentials (#500)

* Support async adal authentication

* Add back delegated token credentials

* Fix environment for Netty behaviors (#501)

* Porting v1 runtime flattening serializer to v2 runtime & configurating jackon adapter to not to fail on empty bean (same config used in v1 jackson adapter)

* Porting SkipParentValidation processing from v1 to v2

* Adding test for FlatteningSerializer

* honor location header for POST & DELETE

* Ignore android build

* Migrate flattening serializer test

* Migrate additional properties from v1

* Shared pool channel TTL support and fix to use available pool channels completely (#502)

* Support for ttl for available connections. Ensure all connections in available pool are re-used

* Polishing prev commit:  Support for ttl for available connections. Ensure all connections in available pool are re-used

* Adding a debug statement

* Removing debug statements, Adding since to Beta, adding missing channel.close()

* [do not merge] Netty client error handling (#505)

* Some meaningless changes

* Checkstyle

* Replacing NettyAdapter with reactor-netty

* Adding a Util type to azure-client-authentication module to hold common utility methods

* Renaming package v2 to v3

* Up build tools version to v3 (#539)

* Fixes in runtime v3 (#540)

* Fix flattening serializer

* Support proxy

* Empty body should not return empty response

* Address cr

* V3 Netty ByteBuf, new pipeline and more (#545)

* Changing HttpResponse::body() return type to ByteBuf

* JDK ByteBuffer to Netty ByteBuf

* Incorporating new pipeline

* Removing HttpPipelineBuilder and enable var-arg policies for HttpPipeline

* Removing inhouse Channel Pool and associated types in favor of reactor-netty's built-in pool

* Removing Request::Context in favor of PipelineCallContext::ContextData. Updating RestProxy/SwaggerMethodParser accordingly.

* Removing callerMethod property of Request instead storing it as pipelinecallcontext data.

* Javadoc updates for set of runtime types

* Removing ServiceFuture and ServiceFutureUtil given we support only reactive async programming

* Adding the prefix 'Rest' to rest response types

* Rename HttpClient::sendRequestAsync to HttpClient::send, Correcting Response::withIsDecoded's return type to Response, Java doc updates for runtime types

* Moving policy as a subpackage of http package (to accomodate any future protocol based policies (tcp e.g.)

* Removing SerializerAdapter Deprecated methods - serializer(), serialize(Object), deserialize(String, Type).

* Removing utility methods for ByteBuffer given we moved to ByteBuf

* Moving rx-java2 to test dependency [from compile-time dependency].

* Javadoc updates for set of runtime types

* Rename HttpPipeline::sendRequest(args) to HttpPipeline::send(args).

* Adding a contract for various paged response

* Updating doc in package-info files of runtime packages.

* Removing HttpClient Factory, some meaningful renames of types, methods,  java-doc update (#546)

* Removing HttpClient Factory, Rename NettyClient to ReactorNettyClient, java doc updates

* Removing async suffix in some runtime method names.

* Decouple HttpResponseDecoder from SwaggerMethodParser, Making Jackson encoders package private, Java-doc updates (#547)

* Moving protocol/SerializerAdapter, HttpResponseDecoder to serializer package.

* Making all runtime jackson codec types to package private

* Improving HttpRrsponseDecoder so that client can easily create one with specific decoding settings, java-doc updates.

* Httpbin update (check for https/http), default impl for HttpResponseDecodeData methods   (#559)

* [test] The protocol part of url property in httpbin response is not consistent with request url, fix:assert for both http and https. The '1.1 vegur' via header is not returned from httpbin anymore.

* Adding default impls for methods in HttpResponseDecodeData interface, java-doc for HttpResponseDecoder.

* Fixing the regression introduced (due to new MalformedValueException type) in the commit c6945f28534b3c57d261e30505c813114994fb84

* Types for http content and headers lazy deserialization and cleanup (#560)

* Introducing types that enables lazy deserialization of http content and headers.

* Using Duration instead of (amount, TemporalUnit) in RetryPolicy

* Removing SystemOutLogger, HttpClientFactory & AbstractPipelinePolicy. Making ContentType &  ReactorNettyClient pkg-private

* bringing content-type back to public (need to decide what to do with this type) (#561)

* Folding http configuration to HttpClient, Adding HttpResponse::bodyAsString(charset) (#562)

* Rename NextPolicy to HttpPipelineNextPolicy.

* (new pattern) Folding http configuration to HttpClient.

* Adding HttpResponse::bodyAsString(Charset) overload

* Upgrading netty version to 4.1.33.Final from 4.1.28.Final (#568)

* Renames RestResponse to RestResponseBase, RestContentResponse to RestResponse (#570)

* Renaming RestResponse to RestResponseBase.

* Renaming RestContentResponse to RestResponse

* Renaming generic types in rest response models (TBody -> T, THeaders -> H)

* removing custom logger API (#571)

* Making HttpMethod native enum (#572)

* Making HttpClient interface (#576)

* Eventhub-java:  integrate event hubs into azure-sdk-for-java repo (#3067)

* eventhubs-java: pom and code changes

* eventhubs-java: client.test.live.yml updated

* LicenseJava: add license info for all java files

* PR-3067: Eventhub-java: integrate event hubs into azure-sdk-for-java repo [Follow up]

* fix: update jproxy link for unit tests

* fix<test-proxy-server>: add external proxy server lib source file for proxy tests

* Making PercentEscaper UrlEscapers package private, Removing unused HttpPipelineLogLevel, using Duration in TimeoutPolicy (#578)

* Defining  better RestResponse type hierarchy (#579)

* Integrating new rest response APIs, Refactoring of the RestProxy to adapt this. Adding tests.

* Updating CheckStyle dependency on `autorest-build-tools` to v3, 3.0.0-SNAPSHOT.

* Adding HttpPipeline::ctr that takes list (#581)

* Disabling a failing test and fixing a regression I introduced. (#582)

* Refactoring of the client-runtime module (#583)

* Introducing implementation package in client-runtime module and moving all eligible types to it.
* Improving the javadocs for the types in the annotations package.

* Adapting to new package structure. (#586)

* Adapting to new package structure.

* using azure-common-parent parent artifactId, starting with version 1.0.0-SNAPSHOT

* Adding all the existing presence and content issues as known issues. Removing "*/data-plane/*" exception in favor of real issues. Cleaning up `analyze` step of job to remove wonky sudo usage. (#3118)

* Generate dependencymanagement report

* Upgrade to Checkstyle 8.18 (#3129)

* Fixes Checkstyle build errors (#3153)

* Add RedundantModifier suppressions for auto-generated files.

* Adding suppression for BatchClient because it is shipped.

* upgrading jackson version to 2.9.4 (#591)

* KeyVault updating versions for release (#3149)

* KeyVault updating versions for release

* updating missed parent version

* EventHubs integration part 1 (#3100)

* eventhubs-java: pom and code changes

* eventhubs-java: client.test.live.yml updated

* LicenseJava: add license info for all java files

* PR-3067: Eventhub-java: integrate event hubs into azure-sdk-for-java repo [Follow up]

* fix: update jproxy link for unit tests

* fix<test-proxy-server>: add external proxy server lib source file for proxy tests

* fix<checkstyle>: fixed all indentation errors

* fix<checkstyle>: FileTabCharacter rule fixed

* fix<checkstyle>: fixed OperatorWrap rule

* fix<checkStyle>: fixed AvoidStarImport rule

* fix<checkstyle>: WhitespaceAround rule

* fix<checkstyle>: NoWhitespaceBefore and WhitespaceAfter rules

* fix<checkstyle>: WhitespaceAround rule

* fix<checkstyle>: RegexpSingleline rule

* fix<checkstyle>: ArrayTypeStyle rule

* fix<checkstyle>: NewlineAtEndOfFile rule

* fix<checkstyle>: UnusedImports

* fix<checkstyle>: ConstantName

* fix<checkstyle>: MethodName and StaticVariableName rules

* fix<checkstyle>: VisibilityModifier

* fix<checkstyle>: EmptyBlock, InnerAssignment

* fix<checkstyle>: ModifierOrder

* fix<checkstyle>: RedundantModifier

* fix<checkstyle-warning>: LeftCurly

* fix<revert>: revert client.test.live.yml changes, exclude event hub

* fix<checkstyle>: additional 10 Indentation errors

* fix<checkstyle, pom>: updates changes for connie's code changes request

* test<live-test>: enable live test for eventhubs

* fix(CheckStyle): update to latest checkstyle-suppressions that matched spotbugs

* EventHubs integration part 2 - spotbugs (#3105)

This PR includes fix for SpotBugs and also corrects some CheckStyle errors left from previous PR (EventHubs integration part 1 #3100):

* fix<SpotBugs>: all 6 P1 bugs

* fix<SpotBugs>: supression and refactor

* fix<SpotBugs>: update spotbugs-exclude with comment for EH

* refactor(SpotBugs): import static

* fix<checkstyle>: access can be package-private

* fix<checkstyle>: modifier public is redundant for interface methods

* fix<checkstyle>: modifier public is redundant for inner class of interface and modifier static is redundant for inner class of interface and inner enum

* fix<checkstyle>: modifier final is redundant for final class

* fix(stylecheck): EmptyBlock

* fix(CheckStyle): EmptyBlock and ConstantName

* fix(CheckStyle): MethodName

* fix(CheckStyle): ConstantName

* fix(CheckStyle): checkstyle suppressions file

* fix(CheckStyle): refactor Inner Assignment

* fix(CheckStyle): refactor Empty Block

* fix(CheckStyle):  update Check Style Suppressions

* fix(CheckStyle): after update to checkstyle 8.18, final modifier modifier

* docs(CheckStyle): clarity the comment, no functional things involved

* Fixes allowing client build pipeline to be run targeting individual client library projects (#3163)

* fixing jetty server to be invoked on pom.client.xml rather than the specified pom.xml

* fixing Analyze tooling to install from root pom.client.xml

* ignore the readme issue

* Mixed reality 2019_02, HdInsight 2018_06_01_preview, Storage_2018_11_01, Edgegateway 2019_03_01 container 2019_02_01 and marketplace_ordering 2015_06_01 (#3179)

* mixed reality 2019_02

* HDInsight 2018_06_01 preview

* container services 2019_02_01

* correcting path to containerservice spec in api-spec.json

* storage 2018_11_01

* edgegateway 2019_03_01

* marketplace ordering 2015_06_01

* spec update for marketplace ordering and edge gateway

* JavaDoc: remove EPH from Other Packages (#3199)

Eventhubs : fixed for JavaDoc 
* fix(JavaDoc): remove EPH from other packages

* Update AsyncServiceClientCredentials to take HttpRequest (#3200)

* Update AsyncServiceClientCredentials to take HttpRequest

* Add AsyncCredentialsPolicy to common library

* Fix editorconfig default settings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants